// ListXSTH.h: interface for the CListXSTH class.
//
//////////////////////////////////////////////////////////////////////
#include "myfunction.h"
#if !defined(AFX_LISTXSTH_H__E198FFB6_347F_4439_A356_3178222241FE__INCLUDED_)
#define AFX_LISTXSTH_H__E198FFB6_347F_4439_A356_3178222241FE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ListCtrlPop.h"
#include "BaseList.h"
#include <afxtempl.h>


class CListXSTH : public CBaseList  
{
public:
	bool CancelTheItem(const int & item);
	void PreOnEditChar(const int& item, const int& subitem, UINT& key);
	bool CheckTheItem(const int& item);
	bool CheckAll();
	bool DeleteSelected();
	int CheckCk(const int& item);
	int CheckYp(const int& item);
	bool SetstrlistKcNumber(CString id,long number);
	bool SetLeftNumber();
	void OnParentMoved();
	void OnESC(const int& item, const int& subitem);
	void OnEditUDNPMessage(const int& item, const int& subitem,UINT key);
	bool Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
	bool InitValuesFromDB();
	CListXSTH(bool	isxsth,CString djph);
	virtual ~CListXSTH();
	void OnEditKillFocus(const int& item,const int& subitem);
	bool OnEditReturn(const int& item,const int& subitem);
	void OnEditSetFocus(const int& item,const int& subitem);
	void OnNewEditChange(const int& item,const int& sub_item);

	bool								m_bXsth;
	CString								m_strDjPh;

	CStringList*						m_pstrlistThYp;
//	CStringList*						m_pstrlist
	CMap<CString,LPCTSTR,long,long>		m_strtolongYpIdToSl;

//	CListCtrlPop*						m_poplist;

	enum{ NONE=	0x0000L,YPTRUE=0x0001L,YPFALSE=0x0002L,CHECKCK=0x0010,NOCK=0xFFE3,CKTRUE=0x0015,CKFALSE=0x0019L};
	//      00000000        01		      10			00010000      11100011    00010101		00011001         
	WORD		m_iTheItemState[100];

	int			m_iYpKcSelected[100];

protected:
	double SetZje();
};

#endif // !defined(AFX_LISTXSTH_H__E198FFB6_347F_4439_A356_3178222241FE__INCLUDED_)
